package com.example.springboot.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.text.DateFormat;
import java.util.Date;

@Controller
public class HelloJSPController {

	@RequestMapping("/myjsp")
	public String myjsp(Model m)
	{
		m.addAttribute("now", DateFormat.getDateTimeInstance().format(new Date()));
		return "MyJSP";//页面名称
	}
}
